<template>
  <div>
  <div class="title">
    <h2>个人信息</h2>
  </div>
  <!--信息列表区-->
  <div class="border">
    <el-form class="content_box" :model="selfForm">
      <el-form-item label="姓名：" prop="name">
        <el-input v-model="selfForm.name" disabled></el-input>
      </el-form-item>
      <el-form-item label="学号：" prop="account">
        <el-input v-model="selfForm.account" disabled></el-input>
      </el-form-item>
      <el-form-item label="邮箱：" prop="email">
        <el-input v-model="selfForm.email" disabled></el-input>
      </el-form-item>
      <el-form-item label="电话：" prop="phone">
        <el-input v-model="selfForm.phone" disabled></el-input>
      </el-form-item>
      <!-- <el-input prop="name" style="width:100%;padding:30px;margin:0 auto;" disabled>
        <template slot="prepend">姓名：</template>
      </el-input>
      <el-input prop="account" style="width:100%;padding:30px;margin:0 auto;" disabled>
        <template slot="prepend">学号：</template>
      </el-input>
      <el-input prop="email" style="width:100%;padding:30px;margin:0 auto;" disabled>
        <template slot="prepend">邮箱：</template>
      </el-input>
      <el-input prop="phone" style="width:100%;padding:30px;margin:0 auto;" disabled>
        <template slot="prepend">电话：</template>
      </el-input> -->
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  created(){
    this.getuserlist()
  },
  data() {
      return {
        selfForm:{}
      }
    },
    methods:{
      async getuserlist(){
        var token = sessionStorage.getItem('token')
        const{data: res}=await this.$http.get(`api/Admin2/look?token=${token}`)
        console.log(res);
        console.log(token);
        console.log(res.data[0]);
        this.selfForm=res.data[0]
        console.log(this.selfForm);
      },
    }
}
</script>

<style scoped>
.title {
  text-align: center;
  margin: 3%;
}
.border {
  width: 800px;
  height: 410px;
  border: 6px solid #009fe8;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.content_box{
  width: 600px;
  height: 400px;
}
</style>